<form action="<?= current_url() ?>" method="post">
<div class="row-fluid" style="margin-bottom: 10px;">
    <div class="span12">
        <div class="box corner-all">
            <div class="box-header grd-white corner-top">
                <i class="icon-file" style="margin-left: 10px;"></i><?= lang('label_menu_link_confirm_pay') ?></div>

            <div class="padded" id="action_load_mudle">
                <!-- action contant  -->
                <h4><span class="details_item"><?= lang('label_menu_link_confirm_pay') . ' (' . lang($inv->title) . ') #' . strtoupper($inv->inv_num) ?> </span></h4>
                <h4><?= $inv->must_pay ?> <?= lang('label_rial') ?></h4>
                <h4>
                    <span class="details_item"><?= lang('label_created_date') ?> </span>
                    <? echo $inv->create_date; ?>
                </h4>
                <ul id="listview">
                    <li>
                        <span class="details_item"><?= lang('label_pay_type') ?> </span>
                        <? if ($inv->pay_type != '') { ?> 

                            <?= lang('label_pay_type_' . strtolower($inv->pay_type)) ?>

                        <? } ?>  

                    </li>
                    <li><span class="details_item"><?= lang('label_cash') ?> </span>
                        <?
                        if ($inv->already_paid != '') {
                            echo $inv->already_paid . ' ' . lang('label_rial');
                        }
                        ?>
                    </li>
                    <li>
                        <span class="details_item"><?= lang('label_payment_date') ?> </span>
                        <?
                        if ($inv->payment_date != '') {
                            echo $inv->payment_date;
                        }
                        ?> 
                    </li>



                </ul>
                <?php if ($inv->pay_type == 'BANK') { ?>
                    <?
                    $wallet_bank = get_inv_bank($inv->inv_num);

                    if (count($wallet_bank) > 0) {
                        ?>
                        <ul id="listview">
                            <li>
                                <h4><?= lang('label_wallet_bank_label') ?> </h4> 
                            </li>

                            <li>
                                <span class="details_item"><?= lang('label_wallet_bank') ?> </span>
                                <?= $wallet_bank->bank_name ?>
                            </li>
                            <li>
                                <span class="details_item"><?= lang('label_wallet_sender_name') ?> </span>
                                <?= $wallet_bank->sender_name ?>
                            </li>
                            <li>
                                <span class="details_item"><?= lang('label_wallet_account_number') ?> </span>
                                <?= $wallet_bank->account_number ?>
                            </li>
                            <li>
                                <span class="details_item"><?= lang('label_note') ?> </span>
                                <?= $wallet_bank->note ?>
                            </li>

                        </ul>
                        <?
                    }
                    ?>
                <?php } ?>
                <div class="tool">
                    <? if ($inv->payment_status == 'YES' && $inv->confirm_status == 'NO') { ?>
                    <button type="submit" name="submit" class="btn btn-success" href="<?= base_url() . get_segment(1) . '/' . get_segment(2) ?>/confirm/<?= $inv->inv_num ?>" style="margin-left:20px;"><i class="icon-check"></i>&nbsp;&nbsp;&nbsp;<?= lang('label_menu_link_confirm_pay') ?></button>
                    <? } ?>
                    <a class="delete_confirm btn" href="<?= base_url() . get_segment(1) . '/' . get_segment(2) ?>/delete/<?= $inv->id ?>"><i class="icon-trash"></i>&nbsp;&nbsp;&nbsp;<?= lang('label_delete') ?></a>
                </div>

            </div>
        </div>
    </div>
</div>
</form>